<?php

namespace Common\Lib\Upload\ImgManager;

class Local implements IImgManager
{
    private $img;

    public function __construct(array $options) { }

    public function set_img(array $img)
    {
        $this->img = $img;
    }

    public function url()
    {
        return __ROOT__ . '/' . $this->img['savepath'] . $this->img['savename'];
    }

    public function path()
    {
        return realpath($this->img['savepath'] . $this->img['savename']);
    }
}